<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>ws-client</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/socket.io/2.3.0/socket.io.dev.js"></script>
</head>
<body>
    hello websocket
</body>
<script>
    let socket = io({transports: ['websocket']});

    socket.on('connect', function(){
        console.log('connect...')
    });
    socket.on('event', function(data){
        console.log(data)
    });
    socket.on('disconnect', function(){
        console.log('close')
    });
</script>
</html>

